<?php
namespace app\api\validate;


class UserAddress extends Base
{
    protected $message = [
        'consignee.require' => '请输入收货人',
        'phone.require' => '请输入电话号码',
        'phone.mobile' => '无效电话号码',
        'address.require' => '请输入详细地址',
        'province_name.require' => '请选择配送地区',
        'city_name.require' => '请选择配送地区',
        'area_name.require' => '请选择配送地区',

    ];

    public function sceneStore()
    {
        return $this->only(['consignee', 'phone', 'address', 'province_id', 'city_id', 'area_id', 'province_name', 'city_name', 'area_name'])
            ->append('consignee', 'require')
            ->append('phone', 'require')
            ->append('address', 'require')
            ->append('province_id', 'require')
            ->append('city_id', 'require')
            ->append('area_id', 'require')
            ->append('province_name', 'require')
            ->append('city_name', 'require')
            ->append('area_name', 'require');
    }
}